<?php
session_start();
$webroot="../";
require_once '../header.php';
function __autoload($className)
	{
    	require_once('../class/' . $className . '.class.php');
	}
session::need_manage();
if(!empty($_GET["plan"]))
{
	$Plan=rtrim(trim($_GET["plan"]));
	$country=rtrim(trim($_GET["country"]));
	$price=rtrim(trim($_GET["price"]));
	$checkVariable=$Plan.$country.$price;
	$verify=verify::check($checkVariable);
	if(session::is_manager()==TRUE)
	{
		if($verify==0)
		{
			$delete=database::Delete("agent_price",array(
			'agent_name' => $Plan,
			'country' => $country
			));
			$update=database::Insert("agent_price",array(
			'agent_name' => $Plan,
			'country' => $country,
			'agent_price' => $price,
			'typecc' => 'visa',
			'typefind' =>'4'
			)
			);
		}
		else 
		{
			echo "erro";
		}
	}
}
else
{
	echo "no thing";
}
?>